      SUBROUTINE DENS76(H,DENS)
C  VERSION OF 2/9/87
C  PURPOSE
C    COMPUTES DENSITY FOR ALTITUDES BETWEEN 86 KM TO 1000 KM USING THE
C    1976 U.S. STANDARD ATMOSPHERE 
C  INPUT ARGUMENTS
C    H      = ALTITUDE (KM)
C  OUTPUT ARGUMENTS
C    DENS   = ATMOSPHERE DENSITY AT H (KG/KM**3)
C  CALL SUBROUTINES
C    NONE
C  REFERENCES
C    JPL EM 312/87-153, 20 APRIL 1987
C    1976 U.S. STANDARD ATMOSPHERE, NOAA, NASA, USAF, U.S. GOVERNMENT
C      PRINT OFFICE, WASHINGTON, D.C., OCTOBER 1976.
C  ANALYSIS
C    JOHNNY H. KWOK - JPL
C  PROGRAMMER
C    JOHNNY H. KWOK - JPL
C  MODIFICATIONS
C    NONE
C  COMMENTS
C    THE DATA T(429) ARE SEGMENTED INTO 18 LINES EACH BECAUSE SOME
C    COMPILERS HAVE A LIMITATION OF THE NUMBER OF CONTINUATION LINES
C    
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION N(3),F(5),G(4),T(429)
      DATA ZERO/0.D0/
      DATA F/86.D0,100.D0,300.D0,500.D0,1000.D0/
      DATA G/0.5D0,1.D0,2.D0,5.D0/
      DATA N/28,228,328/
      DATA (T(I),I=1,126)
     X /6.958D+3,6.366D+3,5.824D+3,5.328D+3,4.875D+3,4.460D+3,4.081D+3
     X ,3.734D+3,3.416D+3,3.126D+3,2.860D+3,2.616D+3,2.393D+3,2.188D+3
     X ,2.000D+3,1.828D+3,1.670D+3,1.526D+3,1.393D+3,1.273D+3,1.162D+3
     X ,1.061D+3,9.685D+2,8.842D+2,8.071D+2,7.367D+2,6.725D+2,6.139D+2
     X ,5.604D+2,4.695D+2,3.935D+2,3.300D+2,2.769D+2,2.325D+2,1.954D+2
     X ,1.643D+2,1.381D+2,1.161D+2,9.708D+1,8.111D+1,6.838D+1,5.811D+1
     X ,4.975D+1,4.289D+1,3.720D+1,3.246D+1,2.847D+1,2.509D+1,2.222D+1
     X ,1.977D+1,1.767D+1,1.585D+1,1.428D+1,1.291D+1,1.171D+1,1.065D+1
     X ,9.717D+0,8.889D+0,8.152D+0,7.494D+0,6.904D+0,6.374D+0,5.897D+0
     X ,5.465D+0,5.074D+0,4.719D+0,4.396D+0,4.101D+0,3.831D+0,3.584D+0
     X ,3.358D+0,3.150D+0,2.958D+0,2.781D+0,2.618D+0,2.466D+0,2.326D+0
     X ,2.196D+0,2.076D+0,1.963D+0,1.859D+0,1.761D+0,1.670D+0,1.585D+0
     X ,1.505D+0,1.431D+0,1.361D+0,1.295D+0,1.233D+0,1.175D+0,1.121D+0
     X ,1.069D+0,1.021D+0,9.750D-1,9.319D-1,8.911D-1,8.525D-1,8.161D-1
     X ,7.815D-1,7.488D-1,7.178D-1,6.883D-1,6.604D-1,6.339D-1,6.086D-1
     X ,5.846D-1,5.618D-1,5.401D-1,5.194D-1,4.997D-1,4.809D-1,4.630D-1
     X ,4.459D-1,4.295D-1,4.139D-1,3.990D-1,3.847D-1,3.711D-1,3.581D-1
     X ,3.456D-1,3.336D-1,3.222D-1,3.112D-1,3.006D-1,2.905D-1,2.809D-1/
      DATA (T(I),I=127,252)
     X /2.716D-1,2.626D-1,2.541D-1,2.458D-1,2.379D-1,2.303D-1,2.230D-1
     X ,2.160D-1,2.092D-1,2.027D-1,1.964D-1,1.904D-1,1.846D-1,1.790D-1
     X ,1.736D-1,1.683D-1,1.633D-1,1.585D-1,1.538D-1,1.493D-1,1.450D-1
     X ,1.408D-1,1.367D-1,1.328D-1,1.290D-1,1.253D-1,1.218D-1,1.184D-1
     X ,1.151D-1,1.119D-1,1.088D-1,1.058D-1,1.029D-1,1.001D-1,9.741D-2
     X ,9.479D-2,9.225D-2,8.979D-2,8.740D-2,8.509D-2,8.285D-2,8.068D-2
     X ,7.858D-2,7.654D-2,7.456D-2,7.265D-2,7.079D-2,6.898D-2,6.723D-2
     X ,6.553D-2,6.388D-2,6.228D-2,6.073D-2,5.922D-2,5.775D-2,5.633D-2
     X ,5.494D-2,5.360D-2,5.229D-2,5.102D-2,4.979D-2,4.859D-2,4.742D-2
     X ,4.629D-2,4.519D-2,4.412D-2,4.307D-2,4.206D-2,4.107D-2,4.011D-2
     X ,3.918D-2,3.827D-2,3.738D-2,3.652D-2,3.568D-2,3.486D-2,3.407D-2
     X ,3.329D-2,3.254D-2,3.180D-2,3.108D-2,3.039D-2,2.971D-2,2.904D-2
     X ,2.840D-2,2.777D-2,2.715D-2,2.656D-2,2.597D-2,2.540D-2,2.485D-2
     X ,2.431D-2,2.378D-2,2.326D-2,2.276D-2,2.227D-2,2.179D-2,2.133D-2
     X ,2.087D-2,2.043D-2,1.999D-2,1.957D-2,1.916D-2,1.836D-2,1.760D-2
     X ,1.688D-2,1.618D-2,1.552D-2,1.489D-2,1.429D-2,1.372D-2,1.317D-2
     X ,1.264D-2,1.214D-2,1.166D-2,1.121D-2,1.077D-2,1.035D-2,9.946D-3
     X ,9.561D-3,9.193D-3,8.841D-3,8.503D-3,8.179D-3,7.869D-3,7.572D-3/
      DATA (T(I),I=253,378)
     X /7.287D-3,7.014D-3,6.751D-3,6.500D-3,6.259D-3,6.027D-3,5.805D-3
     X ,5.592D-3,5.387D-3,5.190D-3,5.001D-3,4.820D-3,4.645D-3,4.478D-3
     X ,4.316D-3,4.162D-3,4.013D-3,3.870D-3,3.732D-3,3.599D-3,3.472D-3
     X ,3.350D-3,3.232D-3,3.118D-3,3.009D-3,2.904D-3,2.803D-3,2.705D-3
     X ,2.611D-3,2.521D-3,2.434D-3,2.350D-3,2.269D-3,2.192D-3,2.117D-3
     X ,2.044D-3,1.975D-3,1.908D-3,1.843D-3,1.781D-3,1.720D-3,1.662D-3
     X ,1.606D-3,1.553D-3,1.501D-3,1.450D-3,1.402D-3,1.355D-3,1.310D-3
     X ,1.267D-3,1.225D-3,1.184D-3,1.145D-3,1.108D-3,1.071D-3,1.036D-3
     X ,1.002D-3,9.694D-4,9.377D-4,9.072D-4,8.777D-4,8.492D-4,8.217D-4
     X ,7.952D-4,7.695D-4,7.447D-4,7.208D-4,6.976D-4,6.753D-4,6.537D-4
     X ,6.328D-4,6.127D-4,5.932D-4,5.743D-4,5.561D-4,5.385D-4,5.215D-4
     X ,4.814D-4,4.446D-4,4.107D-4,3.796D-4,3.509D-4,3.246D-4,3.003D-4
     X ,2.780D-4,2.574D-4,2.384D-4,2.210D-4,2.049D-4,1.900D-4,1.763D-4
     X ,1.637D-4,1.520D-4,1.413D-4,1.313D-4,1.221D-4,1.137D-4,1.058D-4
     X ,9.859D-5,9.190D-5,8.571D-5,7.998D-5,7.468D-5,6.977D-5,6.523D-5
     X ,6.102D-5,5.712D-5,5.350D-5,5.015D-5,4.704D-5,4.416D-5,4.148D-5
     X ,3.900D-5,3.669D-5,3.454D-5,3.255D-5,3.070D-5,2.897D-5,2.736D-5
     X ,2.587D-5,2.448D-5,2.318D-5,2.197D-5,2.084D-5,1.979D-5,1.880D-5/
      DATA (T(I),I=379,429)
     X /1.788D-5,1.702D-5,1.622D-5,1.547D-5,1.476D-5,1.410D-5,1.348D-5
     X ,1.290D-5,1.235D-5,1.184D-5,1.136D-5,1.091D-5,1.048D-5,1.008D-5
     X ,9.697D-6,9.339D-6,9.001D-6,8.682D-6,8.380D-6,8.094D-6,7.824D-6
     X ,7.567D-6,7.324D-6,7.093D-6,6.873D-6,6.664D-6,6.465D-6,6.276D-6
     X ,6.096D-6,5.924D-6,5.759D-6,5.602D-6,5.452D-6,5.308D-6,5.170D-6
     X ,5.038D-6,4.912D-6,4.790D-6,4.673D-6,4.561D-6,4.453D-6,4.349D-6
     X ,4.248D-6,4.152D-6,4.058D-6,3.968D-6,3.881D-6,3.797D-6,3.716D-6
     X ,3.637D-6,3.561D-6/
      DATA ONE/1.D0/
      IF (H.LT.F(1)) GO TO 901
      IF (H.GE.F(2)) GO TO 100
      HH=(H-F(1))/G(1)
      IH=HH+1
      FACT=DMOD(HH,ONE)
      GO TO 500
  100 CONTINUE
      IF (H.GE.F(3)) GO TO 200
      HH=(H-F(2))/G(2)
      IH=HH+N(1)+1
      FACT=DMOD(HH,ONE)
      GO TO 500
  200 CONTINUE
      IF (H.GE.F(4)) GO TO 300
      HH=(H-F(3))/G(3)
      IH=HH+N(2)+1
      FACT=DMOD(HH,ONE)
      GO TO 500
  300 CONTINUE
      IF (H.GT.F(5)) GO TO 902
      HH=(H-F(4))/G(4)
      IH=HH+N(3)+1
      FACT=DMOD(HH,ONE)
      GO TO 500
  500 CONTINUE
      DENS=T(IH)+(T(IH+1)-T(IH))*FACT
      RETURN
  901 CONTINUE
C
C *** DENSITY BELOW TABLE, SET EQUAL AT 86 KM
C
      DENS=T(1)
      RETURN
  902 CONTINUE
C
C *** DENSITY ABOVE TABLE, SET TO ZERO
C
      DENS=ZERO
      RETURN
      END
